export const T3_COMPOUND: ResourceConstant[] = [
    'XKH2O',
    'XKHO2',
    'XZH2O',
    'XZHO2',
    'XGH2O',
    'XGHO2',
    'XLHO2',
    'XLH2O',
    'XUH2O',
    'XUHO2'
];
export const T2_COMPOUND: ResourceConstant[] = [
    'KH2O',
    'KHO2',
    'ZH2O',
    'ZHO2',
    'GH2O',
    'GHO2',
    'LHO2',
    'LH2O',
    'UH2O',
    'UHO2'
];
export const T1_COMPOUND: ResourceConstant[] = [
    'KH',
    'KO',
    'GH',
    'GO',
    'LH',
    'LO',
    'ZO',
    'ZH',
    'UH',
    'UO'
];
export const REACT_MAP: { [product: string]: [ResourceConstant, ResourceConstant] } = {
    // T3
    [RESOURCE_CATALYZED_GHODIUM_ALKALIDE]: [RESOURCE_GHODIUM_ALKALIDE, RESOURCE_CATALYST],
    [RESOURCE_CATALYZED_GHODIUM_ACID]: [RESOURCE_GHODIUM_ACID, RESOURCE_CATALYST],
    [RESOURCE_CATALYZED_ZYNTHIUM_ACID]: [RESOURCE_ZYNTHIUM_ACID, RESOURCE_CATALYST],
    [RESOURCE_CATALYZED_ZYNTHIUM_ALKALIDE]: [RESOURCE_ZYNTHIUM_ALKALIDE, RESOURCE_CATALYST],
    [RESOURCE_CATALYZED_LEMERGIUM_ALKALIDE]: [RESOURCE_LEMERGIUM_ALKALIDE, RESOURCE_CATALYST],
    [RESOURCE_CATALYZED_LEMERGIUM_ACID]: [RESOURCE_LEMERGIUM_ACID, RESOURCE_CATALYST],
    [RESOURCE_CATALYZED_KEANIUM_ALKALIDE]: [RESOURCE_KEANIUM_ALKALIDE, RESOURCE_CATALYST],
    [RESOURCE_CATALYZED_KEANIUM_ACID]: [RESOURCE_KEANIUM_ACID, RESOURCE_CATALYST],
    [RESOURCE_CATALYZED_UTRIUM_ACID]: [RESOURCE_UTRIUM_ACID, RESOURCE_CATALYST],
    [RESOURCE_CATALYZED_UTRIUM_ALKALIDE]: [RESOURCE_UTRIUM_ALKALIDE, RESOURCE_CATALYST],
    // T2
    [RESOURCE_GHODIUM_ACID]: [RESOURCE_GHODIUM_HYDRIDE, RESOURCE_HYDROXIDE],
    [RESOURCE_GHODIUM_ALKALIDE]: [RESOURCE_GHODIUM_OXIDE, RESOURCE_HYDROXIDE],
    [RESOURCE_ZYNTHIUM_ACID]: [RESOURCE_ZYNTHIUM_HYDRIDE, RESOURCE_HYDROXIDE],
    [RESOURCE_ZYNTHIUM_ALKALIDE]: [RESOURCE_ZYNTHIUM_OXIDE, RESOURCE_HYDROXIDE],
    [RESOURCE_LEMERGIUM_ALKALIDE]: [RESOURCE_LEMERGIUM_OXIDE, RESOURCE_HYDROXIDE],
    [RESOURCE_LEMERGIUM_ACID]: [RESOURCE_LEMERGIUM_HYDRIDE, RESOURCE_HYDROXIDE],
    [RESOURCE_KEANIUM_ALKALIDE]: [RESOURCE_KEANIUM_OXIDE, RESOURCE_HYDROXIDE],
    [RESOURCE_KEANIUM_ACID]: [RESOURCE_KEANIUM_HYDRIDE, RESOURCE_HYDROXIDE],
    [RESOURCE_UTRIUM_ACID]: [RESOURCE_UTRIUM_HYDRIDE, RESOURCE_HYDROXIDE],
    [RESOURCE_UTRIUM_ALKALIDE]: [RESOURCE_UTRIUM_OXIDE, RESOURCE_HYDROXIDE],
    // T1
    [RESOURCE_GHODIUM_HYDRIDE]: [RESOURCE_GHODIUM, RESOURCE_HYDROGEN],
    [RESOURCE_GHODIUM_OXIDE]: [RESOURCE_GHODIUM, RESOURCE_OXYGEN],
    [RESOURCE_ZYNTHIUM_HYDRIDE]: [RESOURCE_ZYNTHIUM, RESOURCE_HYDROGEN],
    [RESOURCE_ZYNTHIUM_OXIDE]: [RESOURCE_ZYNTHIUM, RESOURCE_OXYGEN],
    [RESOURCE_LEMERGIUM_OXIDE]: [RESOURCE_LEMERGIUM, RESOURCE_OXYGEN],
    [RESOURCE_LEMERGIUM_HYDRIDE]: [RESOURCE_LEMERGIUM, RESOURCE_HYDROGEN],
    [RESOURCE_KEANIUM_OXIDE]: [RESOURCE_KEANIUM, RESOURCE_OXYGEN],
    [RESOURCE_KEANIUM_HYDRIDE]: [RESOURCE_KEANIUM, RESOURCE_HYDROGEN],
    [RESOURCE_UTRIUM_HYDRIDE]: [RESOURCE_UTRIUM, RESOURCE_HYDROGEN],
    [RESOURCE_UTRIUM_OXIDE]: [RESOURCE_UTRIUM, RESOURCE_OXYGEN],
    // T0
    [RESOURCE_GHODIUM]: [RESOURCE_ZYNTHIUM_KEANITE, RESOURCE_UTRIUM_LEMERGITE],
    [RESOURCE_HYDROXIDE]: [RESOURCE_OXYGEN, RESOURCE_HYDROGEN],
    [RESOURCE_ZYNTHIUM_KEANITE]: [RESOURCE_ZYNTHIUM, RESOURCE_KEANIUM],
    [RESOURCE_UTRIUM_LEMERGITE]: [RESOURCE_UTRIUM, RESOURCE_LEMERGIUM]
};
export const BOOST_PARTS: { [boostType: string]: BodyPartConstant } = {

    UH: ATTACK,
    UO: WORK,
    KH: CARRY,
    KO: RANGED_ATTACK,
    LH: WORK,
    LO: HEAL,
    ZH: WORK,
    ZO: MOVE,
    GH: WORK,
    GO: TOUGH,

    UH2O: ATTACK,
    UHO2: WORK,
    KH2O: CARRY,
    KHO2: RANGED_ATTACK,
    LH2O: WORK,
    LHO2: HEAL,
    ZH2O: WORK,
    ZHO2: MOVE,
    GH2O: WORK,
    GHO2: TOUGH,

    XUH2O: ATTACK,
    XUHO2: WORK,
    XKH2O: CARRY,
    XKHO2: RANGED_ATTACK,
    XLH2O: WORK,
    XLHO2: HEAL,
    XZH2O: WORK,
    XZHO2: MOVE,
    XGH2O: WORK,
    XGHO2: TOUGH,

};

export const BOOST_RESOURCES: { [actionName: string]: Record<number, ResourceConstant> } = {
    attack: {
        1: 'UH',
        2: 'UH2O',
        3: 'XUH2O',
    },
    carry: {
        1: 'KH',
        2: 'KH2O',
        3: 'XKH2O',
    },
    ranged_attack: {
        1: 'KO',
        2: 'KHO2',
        3: 'XKHO2',
    },
    heal: {
        1: 'LO',
        2: 'LHO2',
        3: 'XLHO2',
    },
    move: {
        1: 'ZO',
        2: 'ZHO2',
        3: 'XZHO2',
    },
    tough: {
        1: 'GO',
        2: 'GHO2',
        3: 'XGHO2',
    },
    harvest: {
        1: 'UO',
        2: 'UHO2',
        3: 'XUHO2',
    },
    construct: {
        1: 'LH',
        2: 'LH2O',
        3: 'XLH2O',
    },
    dismantle: {
        1: 'ZH',
        2: 'ZH2O',
        3: 'XZH2O',
    },
    upgrade: {
        1: 'GH',
        2: 'GH2O',
        3: 'XGH2O',
    },

};

export const COMPRESS_MAP = {
    'energy': RESOURCE_BATTERY,
    'L': RESOURCE_LEMERGIUM_BAR,
    'Z': RESOURCE_ZYNTHIUM_BAR,
    'K': RESOURCE_KEANIUM_BAR,
    'U': RESOURCE_UTRIUM_BAR,
    'G': RESOURCE_GHODIUM_MELT,
    'O': RESOURCE_OXIDANT,
    'H': RESOURCE_REDUCTANT,
    'X': RESOURCE_PURIFIER,
};

export const DECOMPRESS_MAP = {
    'battery': RESOURCE_ENERGY,
    'lemergium_bar': RESOURCE_LEMERGIUM,
    'zynthium_bar': RESOURCE_ZYNTHIUM,
    'keanium_bar': RESOURCE_KEANIUM,
    'utrium_bar': RESOURCE_UTRIUM,
    'ghodium_melt': RESOURCE_GHODIUM,
    'oxidant': RESOURCE_OXYGEN,
    'reductant': RESOURCE_HYDROGEN,
    'purifier': RESOURCE_CATALYST,
};